import request from '@/utils/request'

// 查询问卷列表
export function listSurveys(query) {
  return request({
    url: '/yxz/surveys/list',
    method: 'get',
    params: query
  })
}

// 查询问卷详细
export function getSurveys(surveyId) {
  return request({
    url: '/yxz/surveys/' + surveyId,
    method: 'get'
  })
}

// 新增问卷
export function addSurveys(data) {
  return request({
    url: '/yxz/surveys',
    method: 'post',
    data: data
  })
}

// 修改问卷
export function updateSurveys(data) {
  return request({
    url: '/yxz/surveys',
    method: 'put',
    data: data
  })
}

// 删除问卷
export function delSurveys(surveyId) {
  return request({
    url: '/yxz/surveys/' + surveyId,
    method: 'delete'
  })
}
